<?php
/* 
 * Copyright (c) 2018-2021  * 
 * 创建时间：2021-04-24 06:14
 *
 * 项目：upload  -  $  - levssqController.php
 *
 * 作者：liwei 
 */


namespace modules\levfm\controllers;

!defined('INLEV') && exit('Access Denied LEV');

use Lev;
use modules\levfm\helpers\UrlfmHelper;
use modules\levfm\table\LevfmForms;
use lev\base\Controllerv;
use lev\base\Viewv;

class DefaultController extends Controllerv {

    /**
     * Renders the index view for the module
     */
    public function actionIndex()
    {
        if ($formid = floatval(Lev::GPv('opid'))) {
            parent::redirect(UrlfmHelper::lists($formid));
            return;
        }

        Lev::$app['title'] = '表单列表';

        $lists = LevfmForms::findAll(['status'=>0]);

        Viewv::render('default/index', [
            'lists' => $lists,
        ]);

    }

}